package edu.sctu.practice.class02.yangyiqing.exam.test06;

/**
 * Created by Administrator on 2015/10/10 0010.
 */
public class Dog {
    //定义一个类，该类有一个私有成员变量，通过构造方法将其进行赋初值，并提供该成员的getXXX()和setXXX()方法



    private String name;
    private String type;


    public Dog(String name, String type) {
        this.name = name;
        this.type = type;
    }


    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }


    public void write(){
        System.out.println("名字："+name+"  品种："+type);
    }
}
